<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<head>
	<meta charset="UTF-8">
	<link rel="shortcut icon" href="favicon.ico">
	<link rel="stylesheet" href="css/iconfont.css">
	<link rel="stylesheet" href="css/global.css">
	<link rel="stylesheet" href="css/bootstrap.min.css">
	<link rel="stylesheet" href="css/bootstrap-theme.min.css">
	<link rel="stylesheet" href="css/swiper.min.css">
	<link rel="stylesheet" href="css/styles.css">
	<script src="js/jquery.1.12.4.min.js" charset="UTF-8"></script>
	<script src="js/bootstrap.min.js" charset="UTF-8"></script>
	<script src="js/swiper.min.js" charset="UTF-8"></script>
	<script src="js/global.js" charset="UTF-8"></script>
	<script src="js/jquery.DJMask.2.1.1.js" charset="UTF-8"></script>
	<title>XXX</title>

	<script src="js/vue.js"></script>
	<script src="js/axios.min.js"></script>
	<script type="text/javascript">
		$(function(){
			new Vue({
				el: "#app",
				data: {
					order:{

					}
				},
				methods:{
					orderList(statusNo){
						axios.get("http://192.168.6.125:8080/order/list/"+statusNo).then(response=> {
							if (response.data.code==200) {
								this.orders = response.data.data;
							}else{
								alert("错误:"+response.data.msg);
							}
						})
					},

				},
				mounted: function () {

					let url = location.search; //获取url中"?"符后的字串
					if(url.length>0) { //判断是否携带参数
						var params = {};
						if (url.indexOf('?') != -1) {
							this.isShwoInput = true;
							let str = url.substr(url.indexOf('?') + 1);
							let strs = str.split('&');
							for (let i = 0; i < strs.length; i++) {
								params[strs[i].split('=')[0]] = decodeURI(strs[i].split('=')[1]);
							}
						}
					}
						// return params;
						console.log(params);


					axios.get("http://192.168.6.125:8080/order/getById/"+params.id).then(response=> {
						if (response.data.code==200) {
							this.order = response.data.data;
						}else{
							alert("错误:"+response.data.msg);
						}
					})
				}
			});
		})


	</script>
</head>
<body>

				<div class="user-content__box clearfix bgf"  id="app">
					<div class="title">订单中心-订单{{order.orderNo}}</div>
					<div class="order-info__box">
						<div class="order-addr">收货地址：<span class="c6">{{order.name}}，{{order.phone}}，{{order.address}}</span></div>
						<div class="order-info">
							订单信息
							<table>
								<tr>
									<td>订单编号：{{order.orderNo}}</td>
									<td>创建时间：{{order.createDate}}</td>
								</tr>
								<tr>
									<td>付款时间：{{order.payTime}}</td>
									<td>成交时间：{{order.getTime}}</td>
									<td></td>
								</tr>
							</table>
						</div>
						<div class="table-thead">
							<div class="tdf3">商品</div>
							<div class="tdf1">状态</div>
							<div class="tdf1">数量</div>
							<div class="tdf1">单价</div>
							<div class="tdf1">总价</div>
							<div class="tdf1">运费</div>
						</div>
						<div class="order-item__list" v-for="(item,index) in order.orderitems">
							<div class="item">
								<div class="tdf3">
									<a href="item_show.html"><div class="img"><img :src="item.goodsinfo.coverPath" alt="" class="cover"></div>
									<div class="ep2 c6">{{item.goodsinfo.descriptors}}</div></a>
									<div class="attr ep">{{item.stock}}</div>
								</div>
								<div class="tdf1" v-if="order.status==4"><a href="order_evaluate.html">待评价</a><!-- 已确认收货 --></div>
								<div class="tdf1"  v-if="order.status==1"><a href="order_evaluate.html">待付款</a><!-- 待付款 --></div>
								<div class="tdf1" v-if="order.status==3"><a href="order_evaluate.html">待收货</a><!-- 待收货 --></div>
								<div class="tdf1" v-if="order.status==2"><a href="order_evaluate.html">待发货</a><!-- 待发货 --></div>
								<div class="tdf1" v-if="order.status==7"><a href="order_evaluate.html">已取消</a><!-- 已取消 --></div>



								<div class="tdf1">{{item.number}}</div>
								<div class="tdf1">¥{{item.price}}</div>
								<div class="tdf1">¥{{item.sum}}</div>
								<div class="tdf1">
									<div class="ep2">快递<br>¥0.00</div>
								</div>
							</div>


						</div>
						<div class="price-total">
							<div class="fz18 c6">实付款：<b class="cr">¥{{order.payMoney}}</b></div>
						</div>
					</div>
				</div>

</body>
</html>